
public class Properties {

	private int trainCount = 0;
	private int utilityCount = 0;
	private int housesOwned = 0;
	private int hotelsOwned = 0;
	/*private boolean allBrown = false;
	private boolean allBlue = false;
	private boolean allPink = false;
	private boolean allOrange = false;
	private boolean allRed = false;
	private boolean allYellow = false;
	private boolean allGreen = false;
	private boolean allDarkBlue = false;*/
	
	public int getTrainCount() {
	
		return trainCount;
	}
	
	public void setTrainCount(int trainCount) {
	
		this.trainCount = trainCount;
	}
	
	public int getUtilityCount() {
	
		return utilityCount;
	}
	
	public void setUtilityCount(int utilityCount) {
	
		this.utilityCount = utilityCount;
	}
	
	public int getHousesOwned() {
		
		return housesOwned;
	}

	public void setHousesOwned(int housesOwned) {
		
		this.housesOwned = housesOwned;
	}

	public int getHotelsOwned() {
		
		return hotelsOwned;
	}

	public void setHotelsOwned(int hotelsOwned) {
		
		this.hotelsOwned = hotelsOwned;
	}
	
	/*public boolean isAllBrown() {
	
		return allBrown;
	}
	
	public void setAllBrown(boolean allBrown) {
	
		this.allBrown = allBrown;
	}
	
	public boolean isAllBlue() {
	
		return allBlue;
	}
	
	public void setAllBlue(boolean allBlue) {
	
		this.allBlue = allBlue;
	}
	
	public boolean isAllPink() {
	
		return allPink;
	}
	
	public void setAllPink(boolean allPink) {
	
		this.allPink = allPink;
	}
	
	public boolean isAllOrange() {
	
		return allOrange;
	}
	
	public void setAllOrange(boolean allOrange) {
	
		this.allOrange = allOrange;
	}
	
	public boolean isAllRed() {
	
		return allRed;
	}
	
	public void setAllRed(boolean allRed) {
	
		this.allRed = allRed;
	}
	
	public boolean isAllYellow() {
	
		return allYellow;
	}
	
	public void setAllYellow(boolean allYellow) {
	
		this.allYellow = allYellow;
	}
	
	public boolean isAllGreen() {
	
		return allGreen;
	}
	
	public void setAllGreen(boolean allGreen) {
	
		this.allGreen = allGreen;
	}
	
	public boolean isAllDarkBlue() {
	
		return allDarkBlue;
	}
	
	public void setAllDarkBlue(boolean allDarkBlue) {
	
		this.allDarkBlue = allDarkBlue;
	}
	
	public boolean check(Player a, int x, int y) {
		
		for (; x < y; x++) {
			
			if (LotTiles.values()[x].getOwner() != a) {
				
				return false;
			}
		}

		return true;
	}*/

	public Player mortgageProperty (Player a, int value) {
		
		a.setCash(a.getCash()+value);
		
		return a;
	}
	
	public Player unmortgageProperty (Player a, int value) {
		
		if (a.getCash() >= value) {
			
			a.setCash(a.getCash()-value);
		}
		
		else {
			
			//prompt
		}
		
		return a;
	}
	
	public boolean checkIfAllLotsOwned(Player a, int color) {
		
		int x = 0, y = 0;
		
		switch(color) {
		
			case 0: //Brown
				x = 0;
				y = 2;
				break;
			case 1: //Blue
				x = 2;
				y = 5;
				break;
			case 2: //Pink
				x = 5;
				y = 8;
				break;
			case 3: //Orange
				x = 8;
				y = 11;
				break;
			case 4: //Red
				x = 11;
				y = 14;
				break;
			case 5: //Yellow
				x = 14;
				y = 17;
				break;
			case 6: //Green
				x = 17;
				y = 20;
				break;
			case 7: //Dark Blue
				x = 20;
				y = 22;
				break;
		}
		
		for (; x < y; x++) {
			
			if (LotTiles.values()[x].getOwner() != a) {
				
				return false;
			}
		}

		return true;
	}
}
